package com.woniu.command.materialBomCommand;

import com.woniu.command.Command;
import com.woniu.command.handler.MaterialBomCommandHandler;
import com.woniu.outlet.po.MaterialBomPo;
import com.woniu.utils.ApplicationContextHolder;

public class UpdateMaterialBomCommand implements Command<MaterialBomPo, Integer> {

    private MaterialBomCommandHandler handler;

    public UpdateMaterialBomCommand() {
        this.handler = ApplicationContextHolder.getApplicationContext()
                .getBean(MaterialBomCommandHandler.class);
    }

    @Override
    public Integer execute(MaterialBomPo materialBomPo) {
        return this.handler.updateMaterialBom(materialBomPo);
    }
}
